﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="WholesaleSearch.aspx.cs" Inherits="Sales_SalesSearch" %>
<%@ Register Src="../usercontrol/PageNavigator.ascx" TagName="PageNavigator" TagPrefix="uc1" %>
<html>
<head id="Head1" runat="server">
<title>批发查询</title>
<link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
 <script type="text/javascript" src="../js/changerows.js"></script>
 <script type="text/javascript" src="../js/rl.js"></script>
<script type="text/javascript">
function CheckAll(form) {
    for (var i=0;i<form.elements.length;i++) {
	    var e = form.elements[i];
	    if (e.name != 'chkall' && e.type=='checkbox')
		    e.checked = form.chkall.checked;
    }
}

function AllPrintData(txtKdate,txtJdate,txtGuest,txtSalesCode,txtdh)
{
         window.open("DrawPrint9.aspx?txtKdate="+escape(txtKdate)+"&txtJdate="+escape(txtJdate)+"&txtGuest="+escape(txtGuest)+"&txtSalesCode="+escape(txtSalesCode)+"&txtdh="+escape(txtdh)+"","","width=1000px,height=800px,left=100px,top=30px,scrollbars=yes");
        return false;

}

function PrintData(id)
{
    if(id!="")
    {

        window.open("DrawPrint1.aspx?id="+id,"","width=800px,height=650px,left=100px,top=30px,scrollbars=yes");
        return false;
    }
    return false;
}
</script>
<link href="../js/loading.css" rel="stylesheet" type="text/css" /></head>
<script type="text/javascript" src="../js/loading.js" charset="gb2312"></script>
<body>
    <form id="form1" runat="server">
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr> 
    <td width="2%" height="1%"><img src="../images/module.gif" width="20" height="22"></td>
    <td style="text-align: left;">
        &nbsp;<asp:Label ID="lblPath" runat="server"></asp:Label></td></tr>
		</table>
		<table width="99%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td bgcolor="#3CB6E5" height="5px"></td>
          </tr>
        </table>
		<table width="99%" border="0" cellpadding="0" cellspacing="0">
        <tr>
                <td colspan="2" width="100%" align="right">
                    <img src="../images/search.gif" alt="搜索" width="16" height="16" />
                    查询日期：<asp:TextBox ID="txtKdate" runat="server" CssClass="input1" Width="80px" MaxLength="10"></asp:TextBox>至<asp:TextBox ID="txtJdate"
                        runat="server" CssClass="input1" Width="80px" MaxLength="10"></asp:TextBox>客户名称：<asp:TextBox ID="txtGuest" runat="server" CssClass="input1" Width="100px"></asp:TextBox>
                    型号：<asp:TextBox
                        ID="txtSalesCode" runat="server" CssClass="input1" Width="80"></asp:TextBox>
                        单号：<asp:TextBox
                        ID="txtdh" runat="server" CssClass="input1" Width="80"></asp:TextBox>
                    <asp:Button ID="btnSearch" runat="server" Text=" 搜索 " CssClass="submit" OnClick="btnSearch_Click" /></td>
          </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
        </table>
        <asp:GridView ID="GvData" runat="server" Width="99%" AutoGenerateColumns="False"
            CssClass="gridview" EmptyDataText="没有数据" >
             <RowStyle Height="25px" />
            <PagerSettings Visible="False" />
            <Columns>
                <asp:BoundField HeaderText="单号" DataField="SalesCode" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField> 
              
                <asp:BoundField HeaderText="开单日期" DataField="cdate" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="库存类型" DataField="typeStock" >
                 <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="客户名称" DataField="GuestName" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="仓库名" DataField="WarehouseId" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                
                <asp:BoundField HeaderText="商品名称" DataField="comodName" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="型号" DataField="modul" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                
                <asp:BoundField HeaderText="条码" DataField="comodBarcode" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="单价(元)">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("prices","{0:f2}") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:BoundField HeaderText="数量" DataField="number" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="单位" DataField="unit" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                 
           
                      <asp:TemplateField HeaderText="总金额(元)">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("TotalMoney","{0:f2}") %>'></asp:Label>
                    </ItemTemplate>
                          <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:BoundField HeaderText="经办人" DataField="realname" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="打印">
                    <ItemTemplate>
                        <asp:LinkButton ID="linkbtnSales" CommandArgument='<%#Eval("SalesCode") %>' runat="server"
                            OnClick="linkbtnSales_Click" ForeColor="Red">打印</asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
            <EmptyDataRowStyle ForeColor="Red" HorizontalAlign="Center" />
        </asp:GridView>
        <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr >
        <td width="90%" ><uc1:PageNavigator ID="PageNavigator1" ConnectionString="connstr" DataId="GvData" PageSize="20" ShowType="Text" runat="server" /></td>
        <td width="10%">
          <asp:Button ID="Button1" runat="server" CssClass="submit" OnClick="Button1_Click"
                Text="打印列表" /></td>
        </tr>
      </table>
        
        <asp:HiddenField ID="HidWareid" runat="server" />
    </form>
</body>
</html>
<script language="javascript"><!--
//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
senfe("GvData","#ECF9FC","#FFFFFF","#D6F1F8");
--></script>